﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_ThanhToanDauVao : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("advKhachHang")]
        private ADVObjects _advKhachHang;
        [AccessedThroughProperty("Button1")]
        private Button _Button1;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label21")]
        private Label _Label21;
        [AccessedThroughProperty("Label22")]
        private Label _Label22;
        [AccessedThroughProperty("Label23")]
        private Label _Label23;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("TxtChietKhau")]
        private C1NumericEdit _TxtChietKhau;
        [AccessedThroughProperty("TxtConLai")]
        private C1NumericEdit _TxtConLai;
        [AccessedThroughProperty("TxtConLaiSauThanhToan")]
        private C1NumericEdit _TxtConLaiSauThanhToan;
        [AccessedThroughProperty("TxtDaThanhToan")]
        private C1NumericEdit _TxtDaThanhToan;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoHoaDon")]
        private TextBox _TxtSoHoaDon;
        [AccessedThroughProperty("TxtThanhToan")]
        private C1NumericEdit _TxtThanhToan;
        [AccessedThroughProperty("TxtTienHang")]
        private C1NumericEdit _TxtTienHang;
        [AccessedThroughProperty("TxtTienThue")]
        private C1NumericEdit _TxtTienThue;
        [AccessedThroughProperty("TxtTongThanhToan")]
        private C1NumericEdit _TxtTongThanhToan;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        private string cFrmFormat;
        public string cFrmKhoa;
        public string cFrmKhoaHoaDon;
        private IContainer components;
        private clsNhapKho objHD;
        private BHXacNhanThanhToan objXN;

        public Frm_ThanhToanDauVao()
        {
            base.Load += new EventHandler(this.Frm_ThanhToan_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objHD = new clsNhapKho();
            this.objXN = new BHXacNhanThanhToan();
            this.cFrmKhoa = "";
            this.cFrmKhoaHoaDon = "";
            this.cFrmFormat = "";
            this.InitializeComponent();
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            this.objXN.DelData(this.cFrmKhoa);
            this.Close();
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = this.CboLoaiTien.SelectedValue.ToString();
                clsDMLoaiTien tien = new clsDMLoaiTien();
                tien.LoadByCode(strCode);
                this.txtTyGia.Value = tien.TyGia;
                if (tien.SoLe > 0)
                {
                    this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("000000000", tien.SoLe);
                }
                if (tien.TienViet == 1)
                {
                    this.txtTyGia.Enabled = false;
                }
                this.FormatNumber();
            }
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            BHXacNhanThanhToan objXN = this.objXN;
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.cFrmKhoa = modGeneral.CreatKey("BH_HoaDonThanhToan", 15, "");
            }
            objXN.Khoa = this.cFrmKhoa;
            objXN.KhoaNhapXuat = this.cFrmKhoaHoaDon;
            objXN.SoChungTu = this.TxtSoChungTu.Text.Trim();
            objXN.NgayChungTu = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objXN.SoHoaDon = this.TxtSoHoaDon.Text.Trim();
            objXN.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
            objXN.TyGia = Conversions.ToDouble(this.txtTyGia.Value);
            objXN.TienHang = Conversions.ToDouble(this.TxtTienHang.Value);
            objXN.TienChietKhau = Conversions.ToDouble(this.TxtChietKhau.Value);
            objXN.DaThanhToan = Conversions.ToDouble(this.TxtDaThanhToan.Value);
            objXN.TienThue = Conversions.ToDouble(this.TxtTienThue.Value);
            objXN.TienThanhToan = Conversions.ToDouble(this.TxtThanhToan.Value);
            objXN.Loai = "NK";
            objXN.Save();
            this.Close();
            objXN = null;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.TxtTienHang, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienThue, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtChietKhau, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTongThanhToan, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtConLai, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtConLaiSauThanhToan, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtThanhToan, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtDaThanhToan, this.cFrmFormat);
        }

        private void Frm_ThanhToan_Load(object sender, EventArgs e)
        {
            BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
            this.cFrmFormat = modGeneral.H_FORMATNUMBER;
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.LoadData(this.cFrmKhoa);
            }
            else
            {
                this.LoadDataMuaHang(this.cFrmKhoaHoaDon);
            }
            this.FormatNumber();
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_ThanhToanDauVao));
            this.Label21 = new Label();
            this.Label5 = new Label();
            this.advKhachHang = new ADVObjects();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.Button1 = new Button();
            this.CmdCancel = new Button();
            this.Label7 = new Label();
            this.Label6 = new Label();
            this.Panel1 = new Panel();
            this.CmdOK = new Button();
            this.TxtConLaiSauThanhToan = new C1NumericEdit();
            this.TxtThanhToan = new C1NumericEdit();
            this.TxtSoChungTu = new TextBox();
            this.Label2 = new Label();
            this.Label22 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label8 = new Label();
            this.TxtSoHoaDon = new TextBox();
            this.TxtConLai = new C1NumericEdit();
            this.Label4 = new Label();
            this.GroupBox1 = new GroupBox();
            this.TxtDaThanhToan = new C1NumericEdit();
            this.Label3 = new Label();
            this.TxtTongThanhToan = new C1NumericEdit();
            this.Label23 = new Label();
            this.TxtTienThue = new C1NumericEdit();
            this.TxtTienHang = new C1NumericEdit();
            this.TxtChietKhau = new C1NumericEdit();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.TxtConLaiSauThanhToan).BeginInit();
            ((ISupportInitialize) this.TxtThanhToan).BeginInit();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            ((ISupportInitialize) this.TxtConLai).BeginInit();
            this.GroupBox1.SuspendLayout();
            ((ISupportInitialize) this.TxtDaThanhToan).BeginInit();
            ((ISupportInitialize) this.TxtTongThanhToan).BeginInit();
            ((ISupportInitialize) this.TxtTienThue).BeginInit();
            ((ISupportInitialize) this.TxtTienHang).BeginInit();
            ((ISupportInitialize) this.TxtChietKhau).BeginInit();
            this.SuspendLayout();
            this.Label21.AutoSize = true;
            this.Label21.BackColor = Color.Transparent;
            Point point = new Point(8, 0xa6);
            this.Label21.Location = point;
            this.Label21.Name = "Label21";
            Size size = new Size(0x51, 13);
            this.Label21.Size = size;
            this.Label21.TabIndex = 0x8a;
            this.Label21.Text = "Tiền chiết khấu";
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(8, 0x8d);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x37, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x89;
            this.Label5.Text = "Tiền h\x00e0ng";
            this.advKhachHang.Conditions = "";
            this.advKhachHang.LoaiDoiTuong = modGeneral.TypeObjects.KhachHang;
            point = new Point(0x62, 0x52);
            this.advKhachHang.Location = point;
            this.advKhachHang.Name = "advKhachHang";
            this.advKhachHang.ReadOnly = true;
            size = new Size(0x13b, 20);
            this.advKhachHang.Size = size;
            this.advKhachHang.TabIndex = 0x6c;
            this.advKhachHang.UpperText = true;
            this.advKhachHang.Value = "";
            this.advKhachHang.WidthCode = 80;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(0xdd, 0x21);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x6b;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Enabled = false;
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Short;
            point = new Point(0x137, 30);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x66, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 0x69;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(8, 0x21);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x41, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x6a;
            this.Label1.Text = "Số chứng từ";
            this.Button1.Image = (Image) manager.GetObject("Button1.Image");
            this.Button1.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x11b, 5);
            this.Button1.Location = point;
            this.Button1.Name = "Button1";
            size = new Size(0x4e, 0x18);
            this.Button1.Size = size;
            this.Button1.TabIndex = 0x9c;
            this.Button1.Text = "&Hủy";
            this.Button1.UseVisualStyleBackColor = true;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x16c, 5);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 0x9b;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(8, 0x56);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x41, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x6d;
            this.Label7.Text = "Kh\x00e1ch h\x00e0ng";
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new Point(0xe3, 0xe8);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x27, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x9b;
            this.Label6.Text = "C\x00f2n lại";
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.Panel1.Controls.Add(this.Button1);
            this.Panel1.Controls.Add(this.CmdCancel);
            this.Panel1.Controls.Add(this.CmdOK);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x107);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(450, 0x23);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x9d;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xca, 5);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x9a;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.TxtConLaiSauThanhToan.DataType = typeof(double);
            this.TxtConLaiSauThanhToan.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x13c, 0xe4);
            this.TxtConLaiSauThanhToan.Location = point;
            this.TxtConLaiSauThanhToan.Name = "TxtConLaiSauThanhToan";
            this.TxtConLaiSauThanhToan.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtConLaiSauThanhToan.Size = size;
            this.TxtConLaiSauThanhToan.TabIndex = 0x9c;
            this.TxtConLaiSauThanhToan.Tag = null;
            this.TxtConLaiSauThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtConLaiSauThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtThanhToan.DataType = typeof(double);
            this.TxtThanhToan.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x67, 0xe4);
            this.TxtThanhToan.Location = point;
            this.TxtThanhToan.Name = "TxtThanhToan";
            size = new Size(0x66, 20);
            this.TxtThanhToan.Size = size;
            this.TxtThanhToan.TabIndex = 0x9a;
            this.TxtThanhToan.Tag = null;
            this.TxtThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            point = new Point(0x62, 30);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            this.TxtSoChungTu.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 0x68;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(13, 0xe8);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x4a, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x99;
            this.Label2.Text = "Số thanh to\x00e1n";
            this.Label22.AutoSize = true;
            this.Label22.BackColor = Color.Transparent;
            point = new Point(8, 0xc1);
            this.Label22.Location = point;
            this.Label22.Name = "Label22";
            size = new Size(0x34, 13);
            this.Label22.Size = size;
            this.Label22.TabIndex = 0x8b;
            this.Label22.Text = "Tiền thuế";
            this.CboLoaiTien.Enabled = false;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x62, 0x6c);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x66, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 0x99;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x137, 0x6c);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            this.txtTyGia.ReadOnly = true;
            size = new Size(0x66, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 0x9a;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(8, 0x6f);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x9c;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(0xdd, 0x6f);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0x9b;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label8.AutoSize = true;
            this.Label8.BackColor = Color.Transparent;
            point = new Point(8, 0x3b);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x3f, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0x98;
            this.Label8.Text = "Số ho\x00e1 đơn";
            point = new Point(0x62, 0x38);
            this.TxtSoHoaDon.Location = point;
            this.TxtSoHoaDon.Name = "TxtSoHoaDon";
            this.TxtSoHoaDon.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtSoHoaDon.Size = size;
            this.TxtSoHoaDon.TabIndex = 0x97;
            this.TxtConLai.DataType = typeof(double);
            this.TxtConLai.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x137, 0xbd);
            this.TxtConLai.Location = point;
            this.TxtConLai.Name = "TxtConLai";
            this.TxtConLai.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtConLai.Size = size;
            this.TxtConLai.TabIndex = 150;
            this.TxtConLai.Tag = null;
            this.TxtConLai.TextAlign = HorizontalAlignment.Right;
            this.TxtConLai.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new Point(0xdd, 0xc1);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x27, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x95;
            this.Label4.Text = "C\x00f2n lại";
            this.GroupBox1.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.GroupBox1.Controls.Add(this.CboLoaiTien);
            this.GroupBox1.Controls.Add(this.txtTyGia);
            this.GroupBox1.Controls.Add(this.Label11);
            this.GroupBox1.Controls.Add(this.Label10);
            this.GroupBox1.Controls.Add(this.Label8);
            this.GroupBox1.Controls.Add(this.TxtSoHoaDon);
            this.GroupBox1.Controls.Add(this.TxtConLai);
            this.GroupBox1.Controls.Add(this.Label4);
            this.GroupBox1.Controls.Add(this.TxtDaThanhToan);
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.TxtTongThanhToan);
            this.GroupBox1.Controls.Add(this.Label23);
            this.GroupBox1.Controls.Add(this.TxtTienThue);
            this.GroupBox1.Controls.Add(this.TxtTienHang);
            this.GroupBox1.Controls.Add(this.TxtChietKhau);
            this.GroupBox1.Controls.Add(this.Label22);
            this.GroupBox1.Controls.Add(this.Label21);
            this.GroupBox1.Controls.Add(this.Label5);
            this.GroupBox1.Controls.Add(this.advKhachHang);
            this.GroupBox1.Controls.Add(this.Label7);
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Controls.Add(this.TxtNgayChungTu);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.TxtSoChungTu);
            point = new Point(5, 3);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x1b7, 0xdb);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0x98;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "Th\x00f4ng tin h\x00f3a đơn";
            this.TxtDaThanhToan.DataType = typeof(double);
            this.TxtDaThanhToan.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x137, 0xa3);
            this.TxtDaThanhToan.Location = point;
            this.TxtDaThanhToan.Name = "TxtDaThanhToan";
            this.TxtDaThanhToan.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtDaThanhToan.Size = size;
            this.TxtDaThanhToan.TabIndex = 0x94;
            this.TxtDaThanhToan.Tag = null;
            this.TxtDaThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtDaThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0xdd, 0xa7);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x4b, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x93;
            this.Label3.Text = "Đ\x00e3 thanh to\x00e1n";
            this.TxtTongThanhToan.DataType = typeof(double);
            this.TxtTongThanhToan.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x137, 0x89);
            this.TxtTongThanhToan.Location = point;
            this.TxtTongThanhToan.Name = "TxtTongThanhToan";
            this.TxtTongThanhToan.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtTongThanhToan.Size = size;
            this.TxtTongThanhToan.TabIndex = 0x90;
            this.TxtTongThanhToan.Tag = null;
            this.TxtTongThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label23.AutoSize = true;
            this.Label23.BackColor = Color.Transparent;
            point = new Point(0xdd, 0x8d);
            this.Label23.Location = point;
            this.Label23.Name = "Label23";
            size = new Size(0x56, 13);
            this.Label23.Size = size;
            this.Label23.TabIndex = 0x8f;
            this.Label23.Text = "Tổng thanh to\x00e1n";
            this.TxtTienThue.DataType = typeof(double);
            this.TxtTienThue.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x62, 0xbd);
            this.TxtTienThue.Location = point;
            this.TxtTienThue.Name = "TxtTienThue";
            this.TxtTienThue.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtTienThue.Size = size;
            this.TxtTienThue.TabIndex = 0x8e;
            this.TxtTienThue.Tag = null;
            this.TxtTienThue.TextAlign = HorizontalAlignment.Right;
            this.TxtTienThue.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHang.DataType = typeof(double);
            this.TxtTienHang.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x62, 0x89);
            this.TxtTienHang.Location = point;
            this.TxtTienHang.Name = "TxtTienHang";
            this.TxtTienHang.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtTienHang.Size = size;
            this.TxtTienHang.TabIndex = 0x8d;
            this.TxtTienHang.Tag = null;
            this.TxtTienHang.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHang.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtChietKhau.DataType = typeof(double);
            this.TxtChietKhau.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x62, 0xa3);
            this.TxtChietKhau.Location = point;
            this.TxtChietKhau.Name = "TxtChietKhau";
            this.TxtChietKhau.ReadOnly = true;
            size = new Size(0x66, 20);
            this.TxtChietKhau.Size = size;
            this.TxtChietKhau.TabIndex = 140;
            this.TxtChietKhau.Tag = null;
            this.TxtChietKhau.TextAlign = HorizontalAlignment.Right;
            this.TxtChietKhau.VisibleButtons = DropDownControlButtonFlags.None;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(450, 0x12a);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.Label6);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.TxtConLaiSauThanhToan);
            this.Controls.Add(this.TxtThanhToan);
            this.Controls.Add(this.Label2);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Frm_ThanhToanDauVao";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "XAC NHAN THANH TOAN DAU VAO";
            this.Panel1.ResumeLayout(false);
            ((ISupportInitialize) this.TxtConLaiSauThanhToan).EndInit();
            ((ISupportInitialize) this.TxtThanhToan).EndInit();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            ((ISupportInitialize) this.TxtConLai).EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            ((ISupportInitialize) this.TxtDaThanhToan).EndInit();
            ((ISupportInitialize) this.TxtTongThanhToan).EndInit();
            ((ISupportInitialize) this.TxtTienThue).EndInit();
            ((ISupportInitialize) this.TxtTienHang).EndInit();
            ((ISupportInitialize) this.TxtChietKhau).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadData(string strKhoa)
        {
            this.objXN.Load(strKhoa);
            this.TxtSoChungTu.Text = this.objXN.SoChungTu;
            this.TxtSoHoaDon.Text = this.objXN.SoHoaDon;
            this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objXN.NgayChungTu);
            this.TxtTienHang.Value = this.objXN.TienHang;
            this.TxtChietKhau.Value = this.objXN.TienChietKhau;
            this.TxtTienThue.Value = this.objXN.TienThue;
            this.TxtTongThanhToan.Value = (this.objXN.TienHang - this.objXN.TienChietKhau) + this.objXN.TienThue;
            this.TxtDaThanhToan.Value = this.objXN.DaThanhToan;
            this.TxtConLai.Value = Operators.SubtractObject(this.TxtTongThanhToan.Value, this.TxtDaThanhToan.Value);
            this.TxtThanhToan.Value = this.objXN.TienThanhToan;
            this.TxtConLaiSauThanhToan.Value = Operators.SubtractObject(this.TxtConLai.Value, this.TxtThanhToan.Value);
            this.CboLoaiTien.SelectedValue = this.objXN.LoaiTien;
            this.txtTyGia.Value = this.objXN.TyGia;
            this.objHD.Load(this.objXN.KhoaNhapXuat);
            this.advKhachHang.Value = this.objHD.KhoaDoiTuong;
        }

        public void LoadDataMuaHang(string strKhoa)
        {
            this.objHD.Load(strKhoa);
            this.TxtSoChungTu.Text = this.objHD.SoChungTu;
            this.TxtSoHoaDon.Text = this.objHD.SoHoaDon;
            this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objHD.NgayChungTu);
            this.advKhachHang.Value = this.objHD.KhoaDoiTuong;
            this.TxtTienHang.Value = this.objHD.TienHangNT;
            this.TxtChietKhau.Value = this.objHD.TienChietKhauNT;
            this.TxtTienThue.Value = this.objHD.TienThueVATNT;
            this.CboLoaiTien.SelectedValue = this.objHD.LoaiTien;
            this.txtTyGia.Value = this.objHD.TyGia;
            this.TxtTongThanhToan.Value = (this.objHD.TienHangNT - this.objHD.TienChietKhauNT) + this.objHD.TienThueVATNT;
            this.TxtDaThanhToan.Value = this.objHD.DaThanhToanNT;
            this.TxtConLai.Value = Operators.SubtractObject(this.TxtTongThanhToan.Value, this.TxtDaThanhToan.Value);
            this.TxtThanhToan.Value = RuntimeHelpers.GetObjectValue(this.TxtConLai.Value);
            this.TxtConLaiSauThanhToan.Value = 0;
        }

        internal virtual ADVObjects advKhachHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._advKhachHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._advKhachHang = value;
            }
        }

        internal virtual Button Button1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Button1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.Button1_Click);
                if (this._Button1 != null)
                {
                    this._Button1.Click -= handler;
                }
                this._Button1 = value;
                if (this._Button1 != null)
                {
                    this._Button1.Click += handler;
                }
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label21
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label21;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label21 = value;
            }
        }

        internal virtual Label Label22
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label22;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label22 = value;
            }
        }

        internal virtual Label Label23
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label23;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label23 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual C1NumericEdit TxtChietKhau
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtChietKhau;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtChietKhau = value;
            }
        }

        internal virtual C1NumericEdit TxtConLai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtConLai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtConLai = value;
            }
        }

        internal virtual C1NumericEdit TxtConLaiSauThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtConLaiSauThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtConLaiSauThanhToan = value;
            }
        }

        internal virtual C1NumericEdit TxtDaThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDaThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDaThanhToan = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual TextBox TxtSoHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoHoaDon = value;
            }
        }

        internal virtual C1NumericEdit TxtThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtThanhToan = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHang = value;
            }
        }

        internal virtual C1NumericEdit TxtTienThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienThue = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThanhToan = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }
    }
}

